package com.xc.freeapp.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xc.freeapp.dao.DiseasesdetailDao;
import com.xc.freeapp.dao.dataSource.DBContextHolder;
import com.xc.freeapp.entity.Diseasesdetail;
import com.xc.freeapp.service.DiseasesService;

@Service
public class DiseasesServiceImpl implements DiseasesService {

	@Autowired 
	private DiseasesdetailDao diseasesdetailDao;
	public Diseasesdetail selectByPrimaryKey(Integer id) {
		DBContextHolder.switchDataSourceR();//切换数据源
		return diseasesdetailDao.selectByPrimaryKey(id);
	}
	public List<Diseasesdetail> selectByKeyWord(String keyWord) {
		DBContextHolder.switchDataSourceR();//切换数据源
		return diseasesdetailDao.selectByKeyWord(keyWord);
	}

}
